package com.swust.log;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.net.SyslogAppender;



/**
 * @category 自定义log4j级别
 * @Description 
 * @author hmilysean 
 * @date 2016年2月28日 下午1:41:16 
 * @version V0.1
 */
public class CustomerLog {
	
	private static final Level interfaceRank = new interfaceRank(35000,"Interface",SyslogAppender.LOG_LOCAL0);  
	
	private static final Level moneyRank = new moneyRank(35050,"Money",SyslogAppender.LOG_LOCAL0);  

	private static final Level otherApi=new otherApi(45060, "Otherapi", SyslogAppender.LOG_LOCAL0);
	
	//private static final Level warnInfo=new warnInfo(45070, "WarnInfo", SyslogAppender.LOG_LOCAL0);
	
//	private static class warnInfo extends Level{
//
//		
//		/** @Fields serialVersionUID: */
//		  	
//		private static final long serialVersionUID = 1L;
//
//		protected warnInfo(int level, String levelStr, int syslogEquivalent) {
//			super(level, levelStr, syslogEquivalent);
//			// TODO Auto-generated constructor stub
//		}
//		
//	}
	
	
	//其它接口信息		
	private static class otherApi extends Level{

		protected otherApi(int level, String levelStr, int syslogEquivalent) {
			super(level, levelStr, syslogEquivalent);
			// TODO Auto-generated constructor stub
		}

		/** @Fields serialVersionUID: */
		  	
		private static final long serialVersionUID = 1L;
	
	}
			
			
	//暴露出去的接口日志
	private static class interfaceRank extends Level{
		
		
		
		/** @Fields serialVersionUID: */
		  	
		private static final long serialVersionUID = 1L;

		protected interfaceRank(int level, String levelStr, int syslogEquivalent) {
			super(level, levelStr, syslogEquivalent);
			// TODO Auto-generated constructor stub
		}
		
	}
	
	//消费信息日志
	private static class moneyRank extends Level{

		
		/** @Fields serialVersionUID: */
		  	
		private static final long serialVersionUID = 1L;

		protected moneyRank(int level, String levelStr, int syslogEquivalent) {
			super(level, levelStr, syslogEquivalent);
			// TODO Auto-generated constructor stub
		}
		
	}
	
	
	  public static void moneyRank(Logger logger,Object objLogInfo){  
		  logger.log(moneyRank, objLogInfo);
		  
	  }
	  
	  
	  public static void interfaceRank(Logger logger,Object objLogInfo){  
		  logger.log(interfaceRank, objLogInfo);
		  
	  }
	  
	  public static void otherApi(Logger logger,Object objLogInfo){  
		  logger.log(otherApi, objLogInfo);
		  
	  }
	  
//	  public static void warnInfo(Logger logger,Object objLogInfo){
//		  logger.log(warnInfo, objLogInfo);
//	  }
	  
}
